package application;

import java.util.ArrayList;
import java.util.List;

public class UserSession {
	private static UserSession instance = null;
	
	String userName = "";
	char[] password = null;
	boolean loggedIn = false;
	
	public static UserSession getInstance(){
		if(instance == null){
			instance = new UserSession();
		}
		
		return instance;
	}
	
	private UserSession(){
		
	}
	
	public String getUserName() {
		return userName;
	}

	public char[] getPassword() {
		return password;
	}
	
	public void logIn(String userName, char[] password){
		// System.out.println("UserSession::logIn - setting username and pasword");
		this.userName = userName;
		this.password = password;
		this.loggedIn = true;
	}
	
	// Tell the requester if the user has been authenticated
	public int getStatus()
	{
		if(this.loggedIn)
			return 1;
		else
			return 0;
	}
	

}
